Skip to content

Add package validation workflow. #97

Add package validation workflow.

Add package validation workflow. #97

Workflow file for this run

name: Run canary builds
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "29 1 * * 1"
workflow_dispatch:
jobs:
# Source builds are performed on the latest beta of each supported distro to
# make sure we catch any code issues as soon as possible.
validate-source-build:
strategy:
matrix:
- image: ubuntu:devel

Check failure on line 16 in .github/workflows/canary.yml

View workflow run for this annotation

GitHub Actions / Run canary builds

Invalid workflow file

The workflow is not valid. .github/workflows/canary.yml (Line: 16, Col: 9): A sequence was not expected
deps-script: install-apt-deps.sh
codename: $VERSION_CODENAME
pretty-name: $NAME $VERSION
codenames: $UBUNTU_CODENAMES
- image: debian:sid
deps-script: install-apt-deps.sh
codename: $VERSION_CODENAME
pretty-name: $NAME $VERSION
codenames: $UBUNTU_CODENAMES
- image: fedora:rawhide
deps-script: install-rpm-deps.sh
codename: $VERSION_ID
pretty-name: Fedora $VERSION_ID
codenames: $FEDORA_CODENAMES
runs-on: ubuntu-latest
container:
image: ${{ strategy.matrix.image }}
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Install deps
run: ./${{ strategy.matrix.deps-script }}
- name: Test build
run: ./autogen.sh && make && make install
- name: Run tests
run: python3 ./dropbox_test.py
- name: Check that latest OS version is supported
run: |
. ./distro-info.sh
. /etc/os-release
./check-distro-info-support.sh \
"${{ strategy.matrix.codename }}" \
"${{ strategy.matrix.pretty-name }}" \
"${{ strategy.matrix.codenames }}"
build-packages:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Build packages
run: ./build_packages.sh
- name: Upload Ubuntu packages
uses: actions/upload-artifact@v4
with:
name: ubuntu_packages
path: build/ubuntu/pool/main
- name: Upload Debian packages
uses: actions/upload-artifact@v4
with:
name: debian_packages
path: build/debian/pool/main
- name: Upload Fedora packages
uses: actions/upload-artifact@v4
with:
name: fedora_packages
path: build/fedora/pool
test_debs:
strategy:
matrix:
platform:
# Test on all Debian and Ubuntu LTS releases that have GTK 4+, plus
# prerelease to make sure there are no package dependency issues.
- distro: debian
version: bookworm
- distro: debian
version: sid
- distro: ubuntu
version: "24.04"
- distro: ubuntu
version: devel
runs-on: ubuntu-latest
container:
image: "${{ strategy.matrix.platform.distro }}:${{ strategy.matrix.platform.version }}"
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: "${{ strategy.matrix.platform.distro }}_packages"
- name: Install packages
run: apt update && apt upgrade -y && apt install -y --fix-missing ./dropbox_*.*.*_amd64.deb
test_rpm:
strategy:
matrix:
# Fedora doesn't have LTS releases, so just run on latest and rawhide.
version: [latest, rawhide]
runs-on: ubuntu-latest
container:
image: "fedora:${{ strategy.matrix.version }}"
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: "fedora_packages"
- name: Install packages
run: dnf upgrade && dnf install ./nautilus-dropbox-*.*.*-*.*.x86_64.rpm